package com.example.check.mapper;

import com.example.common.AbstractDao;
import com.example.check.entity.UserEntity;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

/**
 * Created by 13296 on 2017/7/13.
 */
public interface UserMapper extends AbstractDao<UserEntity>{

    ArrayList<UserEntity> selectAllUser()throws Exception;

    UserEntity selectUserByID(int id) throws Exception;

    void deleteUserById(int id)throws Exception;

    void insertUser(UserEntity user)throws Exception;

    void editUser(UserEntity user)throws Exception;

    ArrayList<UserEntity> selectUserByField(@Param("field") String field, @Param("code") String code)throws Exception;

    void giveUserRole(@Param("id")int id, @Param("roleLevel")String role)throws Exception;

    ArrayList<UserEntity> selectUserLikeByField(@Param("field") String field, @Param("code") String code)throws Exception;
}
